﻿using Authorization.Entitys.Models;
using Authorization.Entitys.VM;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Authorization.IRepository
{
    public interface IUserRepository
    {


        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="pswd"></param>
        /// <returns></returns>
        Task UpdatePasswordByUserId(string userId, string pswd);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="email"></param>
        /// <param name="pswd"></param>
        /// <returns></returns>
        Task UpdatePasswordByEmail(string email, string pswd);
        /// <summary>
        /// 验证用户名是否存在
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        Task<bool> ExistsUserName(string userName);
        /// <summary>
        /// 验证邮件是否存在
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        Task<bool> ExistsEmail(string email);

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        Task Add(User info);
    }
}
